#ifndef _TASKTYPE_H_
#define _TASKTYPE_H_

#define USER_TASK_NUM 8

#define DEBUG_QUEUE_FALGS 0
#define DEBUG_BEGIN_END 0
#define DEBUG_CREATE_TAS0 0

typedef enum states_enum_name
{
    WAITING,
    READY,
    RUNNING
} states;

typedef struct myTCB_struct_name
{
    int tid;
    states task_state;
    void *stack_top, *stack_end;
    void (*entry)(void);
    struct myTCB_struct_name *next;
} myTCB;

typedef struct FIFOLIST_struct_name
{
	myTCB *start;
	myTCB *end;
} FIFOLIST;

extern void myMain();

#define STACK_SIZE 0x1000
#define STACK_RESERVE 0x10
#define TASK_NUMBER (USER_TASK_NUM + 2)
#define initTskBody myMain

myTCB *idleTask;
myTCB *currentTask;
unsigned long BspContextBase[STACK_SIZE];
unsigned long *BspContext;

#endif
